package app

type (
	ApiController struct {
		ErrNo  int64       `json:"errNo"`  //
		ErrStr string      `json:"errStr"` //
		Data   interface{} `json:"data"`   //
	}
)

/**
首页跳转
*/
func (api *ApiController) Index(ctx *Context) {
	ctx.ShowSuccessPage("Loading...", "/main", 0)
	return
}

/**
登陆后主页
*/
func (api *ApiController) Main(ctx *Context) {

	var data = struct {
		Ip   string
		Port string
	}{
		Ip:   ser.Config.Http.ListenIp,
		Port: ser.Config.Http.ListenPort,
	}

	_ = ctx.View("main.html", data, 200, "template/main.html", "template/include.html")
}
